import Vue from 'vue'
import Router from 'vue-router'
import login from '../components/login.vue'
import main from '../components/main.vue'
import mainShow from '../components/mainShow.vue'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/main',
      name: 'main',
      component: main,
      redirect:'/mainShow',
      meta: { title: '首页' },
      children:[
        {
          path: '/customerManager',
          name: 'customerManager',
          component: ()=>import('../components/MainData/customerManager.vue'),
          meta: { title: '客户管理' }
        },
        {
          path: '/ProductCategory',
          name: 'ProductCategory',
          component: ()=>import('../components/MainData/ProductCategory.vue'),
          meta: { title: '物料产品分类' }
        },
        {
          path: '/ProductManager',
          name: 'ProductManager',
          component: ()=>import('../components/MainData/ProductManager.vue'),
          meta: { title: '物料产品管理' }
        },
        {
          path: '/UnitMeasure',
          name: 'UnitMeasure',
          component: ()=>import('../components/MainData/UnitMeasure.vue'),
          meta: { title: '计量单位' }
        },
        {
          path: '/vendorManager',
          name: 'vendorManager',
          component: ()=>import('../components/MainData/vendorManager.vue'),
          meta: { title: '供应商管理' }
        },
        {
          path: '/workshop',
          name: 'workshop',
          component: ()=>import('../components/MainData/workshop.vue'),
          meta: { title: '车间管理' }
        },
        {
          path: '/workstation',
          name: 'workstation',
          component: ()=>import('../components/MainData/workstation.vue'),
          meta: { title: '工作站' }
        },
        {
          path: '/mainShow',
          name: 'mainShow',
          component: ()=>import('../components/mainShow.vue')
        },
        {
          path: '/WmsUseList',
          name: 'WmsUseList',
          component: ()=>import('../components/WmsList/WmsUseList.vue'),
          meta: { title: '仓库设置' }
        },
        {
          path: '/WmsStoList',
          name: 'WmsStoList',
          component: ()=>import('../components/WmsList/WmsOutList.vue'),
          meta: { title: '库区设置' }
        },
        {
          path: '/WmsOutList',
          name: 'WmsOutList',
          component: ()=>import('../components/WmsList/WmsStoList.vue'),
          meta: { title: '外协发料' }
        },
        {
          path:'/itemrecptList',
          name:'itemrecptList   ',
          component:() =>import('../components/WmsList/itemrecptList.vue'),
          meta: { title: '采购入库' }
        },
        {
          path:'/WmArrList',
          name:'WmArrList   ',
          component:() =>import('../components/WmsList/WmArrList.vue'),
          meta: { title: '到货通知' }
        },
        {
          path:'/toolType',
          name:'toolType   ',
          component:() =>import('../components/tool/toolType.vue'),
          meta: { title: '类型设置' }
        },
        {
          path:'/tool',
          name:'tool   ',
          component:() =>import('../components/tool/tool.vue'),
          meta: { title: '工装夹具台账' }
        }
      ]
    }
  ]

})
